// =================================================================
// File: IndirectBlock.h
// Desc: Contains IndirectBlock class
// =================================================================

#ifndef INDIRECTBLOCK_H
#define INDIRECTBLOCK_H

// =================================================================
// INCLUDES
// =================================================================

#include "config.h"

// =================================================================
// CLASSES
// =================================================================

// =================================================================
// Name: IndirectBlock
// Desc: Class that stores address for indirect addressing in an array
// =================================================================
class IndirectBlock
{
	public:
		IndirectBlock();
		~IndirectBlock();

		int GetAddr(int index) {
			return addr[index];
		}

		int *GetAddrs() {
			return addr;
		}

		void SetAddr(int index, int value) {
			addr[index] = value;
		}

	private:
		int addr[BLOCK_SIZE/INT_SIZE];
};
#endif // INDIRECTBLOCK_H
